﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;

namespace PkwHCFramework.Communications
{
    public class DeviceLink
    {
        /// <summary>
        /// 设备ID
        /// </summary>
        public string UID { get; set; }

        public string Ip { get; set; }

        public int Port { get; set; }

        /// <summary>
        /// 从站地址
        /// </summary>
        public int SlaveID { get; set; } = 1;

        /// <summary>
        /// 采集周期 单位：s
        /// </summary>
        public double AcqTimeSpan { get; set; }

        [JsonIgnore]
        public List<RegisterPoint> Points { get; set; }

        [JsonIgnore]
        public ModbusTcp Comm { get; set; }

        public DeviceLink()
        {
            Points = new List<RegisterPoint>();
        }
    }
}
